<?php


namespace app\apiadmin\validate\system;


use think\Validate;

class PhoneLoginValidate extends Validate
{

    protected $rule = [
        'phone'  =>  'require|unique:siyu_sys_member',
        'code' => 'require'
    ];
    protected $message = [
        'phone.require'=>'管理员账号必填~~',
        'code.require'=>'验证码不能为空'
    ];

    public function sceneApi()
    {
        return $this->only(['phone','code'])
            ->remove('phone', 'unique');
    }

}